package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerRechargeOrderInfo implements IQLResponse
{
    /// <summary>
    /// 订单编号
    /// </summary>
    public String OrderNo;

    /// <summary>
    /// 用户Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 用户昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 支付渠道 1微信支付 2支付宝支付 3支付猫微信 4支付猫支付宝 5聚合微信 6聚合支付宝 7线下支付 85秒支付微信 95秒支付支付宝
    /// </summary>
    public long OrderType;

    /// <summary>
    /// 订单金额，单位：分
    /// </summary>
    public long OrderAmount;

    /// <summary>
    /// 商品类型 1商城 2月卡 3首充礼包 4每日充值 5投资炮倍 6出海保险 7N天持续奖励 8炮倍解锁
    /// </summary>
    public long ContentType;

    /// <summary>
    /// 商品Id
    /// </summary>
    public long ContentId;

    /// <summary>
    /// 1未完成 2已完成
    /// </summary>
    public long OrderState;

    /// <summary>
    /// 订单创建时间
    /// </summary>
    public String OrderCreateTime;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("order_no"))
            OrderNo = t.getString("order_no");
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("order_type"))
            OrderType = t.getLong("order_type");
        if (t.has("order_amount"))
            OrderAmount = t.getLong("order_amount");
        if (t.has("content_type"))
            ContentType = t.getLong("content_type");
        if (t.has("content_id"))
            ContentId = t.getLong("content_id");
        if (t.has("order_state"))
            OrderState = t.getLong("order_state");
        if (t.has("order_create_time"))
            OrderCreateTime = t.getString("order_create_time");
    }
}
